new Vue({
    el: "#content",
    data: {
        deptDate: []
    },
    methods: {
        findAll: function () {
            axios({
                method: 'get',
                url: '/dept/findAllAndUser'
            }).then(res => {
                if (res.data.flag) {
                    this.deptDate = res.data.data;
                }
            });
        },
        detailUser: function (user) {
            if (user.isSecret == 0) {
                layer.msg("对方设置了私秘！");
                return;
            }
            sessionStorage.setItem("userId", user.id);
            location.href = "/html/user_detail.html";
        }
    },
    created: function () {
        this.findAll();
    }
})